package com.health.manage.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

/**
 *
 * @Description: 聊天信息模型
 * @author: user
 */
@Data
@TableName("message")
public class Message implements Serializable{

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "主键")
	@TableId(value = "id", type = IdType.AUTO) //主键注解
	private Long id;

	@ApiModelProperty(value = "状态")
	@TableField("status")
	private String status;

	@ApiModelProperty(value = "类型")
	@TableField("type")
	private String type;

	@ApiModelProperty(value = "发送时间")
	@TableField("sendTime")
	private Long sendTime;

	@ApiModelProperty(value = "发送内容")
	@TableField("content")
	private String content;

	@ApiModelProperty(value = "接收人")
	@TableField("toContactId")
	private String toContactId;

	@TableField(exist = false)
	private User toContactUser;

	@ApiModelProperty(value = "发送人")
	@TableField("fromUserId")
	private String fromUserId;

	@TableField(exist = false)
	private String fromUser;

}
